

int gcd_icse09(int a, int b){
  assert(a>=0);
  assert(b>=0);

  if (a==0){
    return b;
  }
  printf("a b\n");
  while(1){
    printf("%d %d\n",a,b);
    if(!(b!=0)) break;
    if (a>b){
      a = a - b;
    }
    else{
      b = b - a;
    }
  }
  return a;
}
